import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home,
      redirect: "/home"
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/About.vue')
    },
    {
      path: '/home',
      name: 'home',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/view/home.vue'),
      redirect: "/index",
      children: [
        {
          path: '/index',
          name: 'index',
          // route level code-splitting
          // this generates a separate chunk (about.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import(/* webpackChunkName: "about" */ './views/view/index.vue'),
          meta: {
            title: "严选商城-首页"
          }
        },
        {
          path: '/shopping',
          name: 'shopping',
          // route level code-splitting
          // this generates a separate chunk (about.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import(/* webpackChunkName: "about" */ './views/view/shopping.vue'),
          meta: {
            title: "严选商城-购物车"
          }
        },
        {
          path: '/me',
          name: 'me',
          // route level code-splitting
          // this generates a separate chunk (about.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import(/* webpackChunkName: "about" */ './views/view/me.vue'),
          meta: {
            title: "严选商城-个人"
          }
        },
        {
          path: '/fen',
          name: 'fen',
          // route level code-splitting
          // this generates a separate chunk (about.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import(/* webpackChunkName: "about" */ './views/view/fen.vue'),
          meta: {
            title: "严选商城-分类"
          }
        },
      ]
    },
    {
      path: '/cate/:cid',
      name: 'cate',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/mi/cate.vue'),
      meta: {
        title: "严选商城-分类商品"
      }
    },
    {
      path: '/handpic',
      name: 'handpic',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/mi/Handpic.vue'),
      meta: {
        title: "严选商城-专栏"
      }
    },
    {
      path: '/sou',
      name: 'sou',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/mi/sou.vue'),
      meta: {
        title: "严选商城-搜索"
      }
    },
    {
      path: '/xiangqing/:id',
      name: 'xiangqing',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/mi/xiangqing.vue'),
      meta: {
        title: "严选商城-详情"
      }
    },
    {
      path: '/deng',
      name: 'deng',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/mi/deng.vue'),
      meta: {
        title: "严选商城-登录"
      }
    },
    {
      path: '/wenzhan/:id',
      name: 'wenzhan',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/mi/wenzhan.vue'),
      meta: {
        title: "严选商城-文章"
      }
    },
    {
      path: '/kanlie',
      name: 'kanlie',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './components/home/kanlie.vue'),
      meta: {
        title: "严选商城-砍价列表"
      }
    },
    {
      path: '/tuo',
      name: 'tuo',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/tuzhuai/tuo.vue'),
      meta: {
        title: "拖拽"
      }
    },
    {
      path: '/lahome',
      name: 'lahome',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/lativ/lahome.vue'),
      meta: {
        title: "lative"
      }
    },
    {
      path: '/sear',
      name: 'sear',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/lativ/sear.vue'),
      meta: {
        title: "搜索"
      }
    },
    {
      path: '/htindex',
      name: 'htindex',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/houtai/htindex.vue'),
      redirect:"/hthome",
      children: [
        {
          path: '/hthome',
          name: 'hthome',
          // route level code-splitting
          // this generates a separate chunk (about.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import(/* webpackChunkName: "about" */ './views/houtai/hthome.vue'),
          meta: {
            title: "后台element-ul"
          }
        },
      ]
    },
    {
      path: '/fu',
      name: 'fu',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './page/hom/fu.vue'),
      meta: {
        title: "传值"
      }
    },
  ]
})
